public class child extends father implements Comparable<child>{
int age;
int shenggao;
public child(int age,int shenggao){
    this.age=age;
    this.shenggao=shenggao;
}

    public static void main(String[] args) {
        child s1=new child(18,176);
        child s2=new child(17,180);
        childcom s=new childcom();
        System.out.println(s.compare(s1,s2));
        System.out.println(s1.compareTo(s2));
//        child s3=new child();
//        System.out.println(compare());
    }

    @Override
    public int compareTo(child o) {
    if(this.age>o.age)return 1;
    else
        return 0;
    }
//    @Override
//    public int compare(child s1, child s2) {
//        if(s1.age>s2.age)return 1;
//        else return 0;
//    }
}
